package com.javalang;

public class StringClass {
    public static void main(String[] args) {
        String str1="abc";
        String str2 = new String("abc");
        if (str1==str2)
            System.out.println("相等");
        else
            System.out.println("不相等");

        if (str2.equals(str1))
            System.out.println("相等");
        else
            System.out.println("不相等");
    }
}
